package com.sxz.sbs.module.amortize;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * @author : tian
 *         time   : 2018/03/22
 *         desc   :
 */

public class AmortizeBankBean implements Parcelable {

    /**
     * dataList : [{"InterestRate":0,"IsDefault":1,"BankId":2,"PhotoUrl":"","NumBers":12,"BankName":"中国银行","YearOrMonth":1},{"InterestRate":0.354,"IsDefault":0,"BankId":2,"PhotoUrl":"","NumBers":24,"BankName":"中国银行","YearOrMonth":1},{"InterestRate":0.333,"IsDefault":0,"BankId":2,"PhotoUrl":"","NumBers":36,"BankName":"中国银行","YearOrMonth":1},{"InterestRate":0.344,"IsDefault":0,"BankId":2,"PhotoUrl":"","NumBers":48,"BankName":"中国银行","YearOrMonth":1},{"InterestRate":0.325,"IsDefault":0,"BankId":2,"PhotoUrl":"","NumBers":60,"BankName":"中国银行","YearOrMonth":1}]
     * BankId : 2
     * PhotoUrl :
     * BankName : 中国银行
     */

    private int BankId;
    private String PhotoUrl;
    private String BankName;
    private List<DataListBean> dataList;

    public int getBankId() {
        return BankId;
    }

    public void setBankId(int BankId) {
        this.BankId = BankId;
    }

    public String getPhotoUrl() {
        return PhotoUrl;
    }

    public void setPhotoUrl(String PhotoUrl) {
        this.PhotoUrl = PhotoUrl;
    }

    public String getBankName() {
        return BankName;
    }

    public void setBankName(String BankName) {
        this.BankName = BankName;
    }

    public List<DataListBean> getDataList() {
        return dataList;
    }

    public void setDataList(List<DataListBean> dataList) {
        this.dataList = dataList;
    }

    public static class DataListBean implements Parcelable {
        /**
         * InterestRate : 0
         * IsDefault : 1
         * BankId : 2
         * PhotoUrl :
         * NumBers : 12
         * BankName : 中国银行
         * YearOrMonth : 1
         */

        private double InterestRate;
        private int IsDefault;
        private int BankId;
        private String PhotoUrl;
        private int NumBers;
        private String BankName;
        private int YearOrMonth;

        public double getInterestRate() {
            return InterestRate;
        }

        public void setInterestRate(double InterestRate) {
            this.InterestRate = InterestRate;
        }

        public int getIsDefault() {
            return IsDefault;
        }

        public void setIsDefault(int IsDefault) {
            this.IsDefault = IsDefault;
        }

        public int getBankId() {
            return BankId;
        }

        public void setBankId(int BankId) {
            this.BankId = BankId;
        }

        public String getPhotoUrl() {
            return PhotoUrl;
        }

        public void setPhotoUrl(String PhotoUrl) {
            this.PhotoUrl = PhotoUrl;
        }

        public int getNumBers() {
            return NumBers;
        }

        public void setNumBers(int NumBers) {
            this.NumBers = NumBers;
        }

        public String getBankName() {
            return BankName;
        }

        public void setBankName(String BankName) {
            this.BankName = BankName;
        }

        public int getYearOrMonth() {
            return YearOrMonth;
        }

        public void setYearOrMonth(int YearOrMonth) {
            this.YearOrMonth = YearOrMonth;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeDouble(this.InterestRate);
            dest.writeInt(this.IsDefault);
            dest.writeInt(this.BankId);
            dest.writeString(this.PhotoUrl);
            dest.writeInt(this.NumBers);
            dest.writeString(this.BankName);
            dest.writeInt(this.YearOrMonth);
        }

        public DataListBean() {
        }

        protected DataListBean(Parcel in) {
            this.InterestRate = in.readDouble();
            this.IsDefault = in.readInt();
            this.BankId = in.readInt();
            this.PhotoUrl = in.readString();
            this.NumBers = in.readInt();
            this.BankName = in.readString();
            this.YearOrMonth = in.readInt();
        }

        public static final Creator<DataListBean> CREATOR = new Creator<DataListBean>() {
            @Override
            public DataListBean createFromParcel(Parcel source) {
                return new DataListBean(source);
            }

            @Override
            public DataListBean[] newArray(int size) {
                return new DataListBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.BankId);
        dest.writeString(this.PhotoUrl);
        dest.writeString(this.BankName);
        dest.writeList(this.dataList);
    }

    public AmortizeBankBean() {
    }

    protected AmortizeBankBean(Parcel in) {
        this.BankId = in.readInt();
        this.PhotoUrl = in.readString();
        this.BankName = in.readString();
        this.dataList = new ArrayList<DataListBean>();
        in.readList(this.dataList, DataListBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<AmortizeBankBean> CREATOR = new Parcelable.Creator<AmortizeBankBean>() {
        @Override
        public AmortizeBankBean createFromParcel(Parcel source) {
            return new AmortizeBankBean(source);
        }

        @Override
        public AmortizeBankBean[] newArray(int size) {
            return new AmortizeBankBean[size];
        }
    };
}
